var shop = JSON.parse($.cookie("shop"))
//console.log(shop[1].color)
var str = ""
var arr = 0
for(var i = 0 ; i<shop.length ; i++ ){
	console.log(shop[i].src)
	str += `<table border="" cellspacing="0" cellpadding="0">
		<tr class="tr1">
			<td class="td1"><span>商品信息</span></td>
			<td class="td2">单价(元)</td>
			<td class="td3">数量</td>
			<td class="td4">小计(元)</td>
		</tr>
		<tr class="tr2">
			<td class="td1">
				<img src = "${shop[i].src}">
				<div class="lfe">
					<p class="p3">${shop[i].name}</p>
					<p class="p1">颜色:${shop[i].color}<span></span></p>
					<p class="p2">尺寸:${shop[i].size}<span></span></p>
				</div>
			</td>
			<td class="td2">
				<i>¥</i><span>${shop[i].price}</span>
			</td>
			<td class="td3">
				<span>${shop[i].num}</span>
			</td>
			<td class="td4">
				<i>¥</i><span>${shop[i].price*shop[i].num}</span>
			</td>
		</tr>
		</table>`
}
var ary = 0 
$(".qd table").html(str)
for(var i = 0 ; i<shop.length ; i++ ){
	arr += shop[i].price*shop[i].num
	ary += parseFloat(shop[i].yun)
}
$(".bz .spa1").html(arr)
$(".bz .spa3").html(arr)
$(".bz .spa2").html(ary.toFixed(2))
console.log(shop)